package com.cq.cqmall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cq.common.utils.PageUtils;
import com.cq.cqmall.product.entity.CategoryEntity;
import com.cq.cqmall.product.vo.Catalog2VO;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author 程崎
 * @email 2972084238@email.com
 * @date 2022-08-29 01:53:20
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 查出所有分类以及子分类，以树形结构组装起来
     *
     * @return {@link List}<{@link CategoryEntity}>
     */
    List<CategoryEntity> listWithTree();

    /**
     * 删除菜单由ids
     *
     * @param asList 正如列表
     */
    void removeMenuByIds(List<Long> asList);

    Long[] findCatelogPath(Long catelogId);

    void updateCascade(CategoryEntity category);

    List<CategoryEntity> getLevel1Categories();

    Map<String, List<Catalog2VO>> getCatalogJson();
}

